﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;

namespace PVFSLEAP
{
	public partial class F_NDIF: Form
	{
		C_MSSG MG = new C_MSSG();

		string	NDID = null;
		string	PRID = null;
		string	ENGY = null;
		string	HPCT = null;
		string	MGCT = null;
		string	COST = null;
		//string	CTFR = null;
		//string	CTFM = null;
		string	CHLD = null;

		public F_NDIF()
		{
			InitializeComponent();
		}

		public F_NDIF( int ndid, int prid, int hpct, double engy, int mgct, float cost )
		{
			this.NDID = ndid.ToString();
			this.PRID = prid.ToString();
			this.ENGY = engy.ToString();
			this.HPCT = hpct.ToString();
			this.MGCT = mgct.ToString();
			this.COST = cost.ToString();			
			//this.CTFR = ctfr.ToString();
			//this.CTFM = ctfm.ToString();
			//this.CHLD = chld.ToString();
			
			InitializeComponent();
			initialize();
			SetGrid();
		}

		public F_NDIF( int ndid, int prid, int hpct, double engy, float cost, int chld )
		{
			this.NDID = ndid.ToString();
			this.PRID = prid.ToString();
			this.ENGY = engy.ToString();
			this.HPCT = hpct.ToString();
			//this.MGCT = mgct.ToString();
			this.COST = cost.ToString();
			//this.CTFR = ctfr.ToString();
			//this.CTFM = ctfm.ToString();
			this.CHLD = chld.ToString();

			InitializeComponent();
			initialize();
			SetGrid();
		}

		private void BT_CLSE_Click( object sender, EventArgs e )
		{
			Close();
		}

		public void initialize()
		{
			DG_INFO.RowCount = 9;

			DG_INFO[0, 0].Value = MG.GRID_CL00;	// NDID
			DG_INFO[0, 1].Value = MG.GRID_CL01;	// PRID
			DG_INFO[0, 2].Value = MG.GRID_CL03; // ENGY
			DG_INFO[0, 3].Value = MG.GRID_CL02; // HPCT
			DG_INFO[0, 4].Value = MG.GRID_CL05; // MGCT
			DG_INFO[0, 5].Value = MG.GRID_CL04; // COST
			//DG_INFO[0, 6].Value = MG.GRID_CL07; // CTFR
			//DG_INFO[0, 7].Value = MG.GRID_CL08; // CTFM
			DG_INFO[0, 8].Value = MG.GRID_CL06; // CHLD
		}

		public void SetGrid()
		{
			DG_INFO[1,  0].Value = NDID;
			DG_INFO[1,  1].Value = PRID;
			DG_INFO[1,  2].Value = ENGY;
			DG_INFO[1,  3].Value = HPCT;
			DG_INFO[1,  4].Value = MGCT;
			DG_INFO[1,  5].Value = COST;
			//DG_INFO[1,  6].Value = CTFR;
			//DG_INFO[1,  7].Value = CTFM;
			DG_INFO[1, 8].Value = CHLD;
		}
	}
}
